<!DOCTYPE html>
<html>
<head>
    <title>Polls Index</title>
    {% load static %}
    <link rel="stylesheet" href="{% static 'polls/css/index.css' %}">
</head>
<body>
    <header>
        <h1>Latest Polls</h1>
    </header>
    <main>
        {% if latest_question_list %}
            <ul class="poll-list">
            {% for question in latest_question_list %}
                <li class="poll-item">
                    <a href="{% url 'polls:detail' question.id %}">{{ question.question_text }}</a>
                </li>
            {% endfor %}
            </ul>
            <b><a href="{% url 'polls:landing' %}">Back to landing</a></b>
        {% else %}
            <p>No polls are available.</p>
        {% endif %}
    </main>
    <footer>
        <p class="copy-right">&copy; 2024 MyPolls</p>
    </footer>
</body>
</html>